Integrand size = 23, antiderivative size = 196 \[ \int \frac {(d \cos (e+f x))^n}{a+b \sec (e+f x)} \, dx=\frac {a \operatorname {AppellF1}\left (\frac {1}{2},\frac {1}{2} (-1-n),1,\frac {3}{2},\sin ^2(e+f x),\frac {a^2 \sin ^2(e+f x)}{a^2-b^2}\right ) \cos (e+f x) (d \cos (e+f x))^n \cos ^2(e+f x)^{\frac {1}{2} (-1-n)} \sin (e+f x)}{\left (a^2-b^2\right ) f}-\frac {b \operatorname {AppellF1}\left (\frac {1}{2},-\frac {n}{2},1,\frac {3}{2},\sin ^2(e+f x),\frac {a^2 \sin ^2(e+f x)}{a^2-b^2}\right ) (d \cos (e+f x))^n \cos ^2(e+f x)^{-n/2} \sin (e+f x)}{\left (a^2-b^2\right ) f} \]
a*AppellF1(1/2,-1/2-1/2*n,1,3/2,sin(f*x+e)^2,a^2*sin(f*x+e)^2/(a^2-b^2))*c os(f*x+e)*(d*cos(f*x+e))^n*(cos(f*x+e)^2)^(-1/2-1/2*n)*sin(f*x+e)/(a^2-b^2 )/f-b*AppellF1(1/2,-1/2*n,1,3/2,sin(f*x+e)^2,a^2*sin(f*x+e)^2/(a^2-b^2))*( d*cos(f*x+e))^n*sin(f*x+e)/(a^2-b^2)/f/((cos(f*x+e)^2)^(1/2*n))
Leaf count is larger than twice the leaf count of optimal. \(5216\) vs. \(2(196)=392\).
Time = 27.48 (sec) , antiderivative size = 5216, normalized size of antiderivative = 26.61 \[ \int \frac {(d \cos (e+f x))^n}{a+b \sec (e+f x)} \, dx=\text {Result too large to show} \]
Time = 0.79 (sec) , antiderivative size = 209, normalized size of antiderivative = 1.07, number of steps used = 11, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.435, Rules used = {3042, 4752, 3042, 4356, 3042, 3302, 3042, 3668, 25, 333}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {(d \cos (e+f x))^n}{a+b \sec (e+f x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (d \sin \left (e+f x+\frac {\pi }{2}\right )\right )^n}{a+b \csc \left (e+f x+\frac {\pi }{2}\right )}dx\) |
\(\Big \downarrow \) 4752 |
\(\displaystyle (d \cos (e+f x))^n (d \sec (e+f x))^n \int \frac {(d \sec (e+f x))^{-n}}{a+b \sec (e+f x)}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle (d \cos (e+f x))^n (d \sec (e+f x))^n \int \frac {\left (d \csc \left (e+f x+\frac {\pi }{2}\right )\right )^{-n}}{a+b \csc \left (e+f x+\frac {\pi }{2}\right )}dx\) |
\(\Big \downarrow \) 4356 |
\(\displaystyle \cos ^{-n}(e+f x) (d \cos (e+f x))^n \int \frac {\cos ^{n+1}(e+f x)}{b+a \cos (e+f x)}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \cos ^{-n}(e+f x) (d \cos (e+f x))^n \int \frac {\sin \left (e+f x+\frac {\pi }{2}\right )^{n+1}}{b+a \sin \left (e+f x+\frac {\pi }{2}\right )}dx\) |
\(\Big \downarrow \) 3302 |
\(\displaystyle \cos ^{-n}(e+f x) (d \cos (e+f x))^n \left (b \int \frac {\cos ^{n+1}(e+f x)}{b^2-a^2 \cos ^2(e+f x)}dx-a \int \frac {\cos ^{n+2}(e+f x)}{b^2-a^2 \cos ^2(e+f x)}dx\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \cos ^{-n}(e+f x) (d \cos (e+f x))^n \left (b \int \frac {\sin \left (e+f x+\frac {\pi }{2}\right )^{n+1}}{b^2-a^2 \sin \left (e+f x+\frac {\pi }{2}\right )^2}dx-a \int \frac {\sin \left (e+f x+\frac {\pi }{2}\right )^{n+2}}{b^2-a^2 \sin \left (e+f x+\frac {\pi }{2}\right )^2}dx\right )\) |
\(\Big \downarrow \) 3668 |
\(\displaystyle \cos ^{-n}(e+f x) (d \cos (e+f x))^n \left (\frac {b \cos ^n(e+f x) \cos ^2(e+f x)^{-n/2} \int -\frac {\left (1-\sin ^2(e+f x)\right )^{n/2}}{-\sin ^2(e+f x) a^2+a^2-b^2}d\sin (e+f x)}{f}-\frac {a \cos ^{n+1}(e+f x) \cos ^2(e+f x)^{\frac {1}{2} (-n-1)} \int -\frac {\left (1-\sin ^2(e+f x)\right )^{\frac {n+1}{2}}}{-\sin ^2(e+f x) a^2+a^2-b^2}d\sin (e+f x)}{f}\right )\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \cos ^{-n}(e+f x) (d \cos (e+f x))^n \left (\frac {a \cos ^{n+1}(e+f x) \cos ^2(e+f x)^{\frac {1}{2} (-n-1)} \int \frac {\left (1-\sin ^2(e+f x)\right )^{\frac {n+1}{2}}}{-\sin ^2(e+f x) a^2+a^2-b^2}d\sin (e+f x)}{f}-\frac {b \cos ^n(e+f x) \cos ^2(e+f x)^{-n/2} \int \frac {\left (1-\sin ^2(e+f x)\right )^{n/2}}{-\sin ^2(e+f x) a^2+a^2-b^2}d\sin (e+f x)}{f}\right )\) |
\(\Big \downarrow \) 333 |
\(\displaystyle \cos ^{-n}(e+f x) (d \cos (e+f x))^n \left (\frac {a \sin (e+f x) \cos ^{n+1}(e+f x) \cos ^2(e+f x)^{\frac {1}{2} (-n-1)} \operatorname {AppellF1}\left (\frac {1}{2},\frac {1}{2} (-n-1),1,\frac {3}{2},\sin ^2(e+f x),\frac {a^2 \sin ^2(e+f x)}{a^2-b^2}\right )}{f \left (a^2-b^2\right )}-\frac {b \sin (e+f x) \cos ^n(e+f x) \cos ^2(e+f x)^{-n/2} \operatorname {AppellF1}\left (\frac {1}{2},-\frac {n}{2},1,\frac {3}{2},\sin ^2(e+f x),\frac {a^2 \sin ^2(e+f x)}{a^2-b^2}\right )}{f \left (a^2-b^2\right )}\right )\) |
((d*Cos[e + f*x])^n*((a*AppellF1[1/2, (-1 - n)/2, 1, 3/2, Sin[e + f*x]^2, (a^2*Sin[e + f*x]^2)/(a^2 - b^2)]*Cos[e + f*x]^(1 + n)*(Cos[e + f*x]^2)^(( -1 - n)/2)*Sin[e + f*x])/((a^2 - b^2)*f) - (b*AppellF1[1/2, -1/2*n, 1, 3/2 , Sin[e + f*x]^2, (a^2*Sin[e + f*x]^2)/(a^2 - b^2)]*Cos[e + f*x]^n*Sin[e + f*x])/((a^2 - b^2)*f*(Cos[e + f*x]^2)^(n/2))))/Cos[e + f*x]^n
3.9.78.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_), x_Symbol] :> Sim p[a^p*c^q*x*AppellF1[1/2, -p, -q, 3/2, (-b)*(x^2/a), (-d)*(x^2/c)], x] /; F reeQ[{a, b, c, d, p, q}, x] && NeQ[b*c - a*d, 0] && (IntegerQ[p] || GtQ[a, 0]) && (IntegerQ[q] || GtQ[c, 0])
Int[((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)/((a_) + (b_.)*sin[(e_.) + (f_.)*( x_)]), x_Symbol] :> Simp[a Int[(d*Sin[e + f*x])^n/(a^2 - b^2*Sin[e + f*x] ^2), x], x] - Simp[b/d Int[(d*Sin[e + f*x])^(n + 1)/(a^2 - b^2*Sin[e + f* x]^2), x], x] /; FreeQ[{a, b, d, e, f, n}, x] && NeQ[a^2 - b^2, 0]
Int[((d_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)]^2)^(p_.), x_Symbol] :> With[{ff = FreeFactors[Cos[e + f*x], x]}, Simp[( -ff)*d^(2*IntPart[(m - 1)/2] + 1)*((d*Sin[e + f*x])^(2*FracPart[(m - 1)/2]) /(f*(Sin[e + f*x]^2)^FracPart[(m - 1)/2])) Subst[Int[(1 - ff^2*x^2)^((m - 1)/2)*(a + b - b*ff^2*x^2)^p, x], x, Cos[e + f*x]/ff], x]] /; FreeQ[{a, b, d, e, f, m, p}, x] && !IntegerQ[m]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.), x_Symbol] :> Simp[Sin[e + f*x]^n*(d*Csc[e + f*x])^n Int[(b + a*Sin[e + f*x])^m/Sin[e + f*x]^(m + n), x], x] /; FreeQ[{a, b, d, e, f, n} , x] && NeQ[a^2 - b^2, 0] && IntegerQ[m]
Int[(u_)*((c_.)*sin[(a_.) + (b_.)*(x_)])^(m_.), x_Symbol] :> Simp[(c*Csc[a + b*x])^m*(c*Sin[a + b*x])^m Int[ActivateTrig[u]/(c*Csc[a + b*x])^m, x], x] /; FreeQ[{a, b, c, m}, x] && !IntegerQ[m] && KnownSecantIntegrandQ[u, x ]
\[\int \frac {\left (d \cos \left (f x +e \right )\right )^{n}}{a +b \sec \left (f x +e \right )}d x\]
\[ \int \frac {(d \cos (e+f x))^n}{a+b \sec (e+f x)} \, dx=\int { \frac {\left (d \cos \left (f x + e\right )\right )^{n}}{b \sec \left (f x + e\right ) + a} \,d x } \]
\[ \int \frac {(d \cos (e+f x))^n}{a+b \sec (e+f x)} \, dx=\int \frac {\left (d \cos {\left (e + f x \right )}\right )^{n}}{a + b \sec {\left (e + f x \right )}}\, dx \]
\[ \int \frac {(d \cos (e+f x))^n}{a+b \sec (e+f x)} \, dx=\int { \frac {\left (d \cos \left (f x + e\right )\right )^{n}}{b \sec \left (f x + e\right ) + a} \,d x } \]
\[ \int \frac {(d \cos (e+f x))^n}{a+b \sec (e+f x)} \, dx=\int { \frac {\left (d \cos \left (f x + e\right )\right )^{n}}{b \sec \left (f x + e\right ) + a} \,d x } \]
Timed out. \[ \int \frac {(d \cos (e+f x))^n}{a+b \sec (e+f x)} \, dx=\int \frac {{\left (d\,\cos \left (e+f\,x\right )\right )}^n}{a+\frac {b}{\cos \left (e+f\,x\right )}} \,d x \]